<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://unpkg.com/vue@next"></script>
</head>
<body>
    <div id="app">
        <!-- <todo-list>
            <template v-slot:default="slotProps">
                <span>{{slotProps.item}}</span>
            </template>
        </todo-list> -->

        <!-- <todo-list v-slot:default="slotProps">
            <span>{{slotProps.item}}</span>
        </todo-list> -->

        <todo-list v-slot="slotProps">
            <span>{{slotProps.item}}</span>
        </todo-list>
    </div>
AAaaa
    <script>
        const AppComp={
            data() {
                return {
                    
                }
            },
        }

        const TodoListComp={
           data() {
               return {
                   todoItems:[
                       "abc",
                       "def",
                       "ghi",
                       "jkl",
                       "mno"
                   ]
               }
           },
           template:`
                <ul>
                    <li v-for="(item,index) in todoItems" :key=index>
                        <slot :index="index" :item="item"></slot>
                    </li>
                </ul>
           `
        }

        const app = Vue.createApp(AppComp)
        app.component("todo-list",TodoListComp);
        const vm = app.mount("#app")
    </script>
</body>
</html>